package com.wanmait.recruitment.service;

import com.github.pagehelper.PageInfo;
import com.wanmait.recruitment.pojo.Company;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

public interface CompanyService extends CommonService<Company> {

    Company getUserByActiveCode(String code);

    void modify(Company company);

    void register(Company company);

    String checkUsername(String username);

    void updateUserPass(String email, String userpass);

    Company findByUsername(String email);

    Company login(String email, String userpass);


    Company FindAllCompany(Integer id);

    void updateById(Company loginCompany);


    List<Company> findByName(String companyname);

    List<Company> companySearchJudge(String kd);

    Company companySearch(String companyName);

    Company findByIdAndEmail(String email,Integer id);

    void openCreate(String email);
    //增加每天发布职位的数量
    int insertNowJobCount(Integer id);
    //增加发布职位的数量
    int insertJobCount(Integer id);
    //每天十二点清零
    int updateNowJobCount();
    //修改公司接受的简历数量
    void updateResumeCount(Integer id,Integer change);
    Company selectFindByCompanyById(Integer id);


    @Cacheable("companyCache")
    PageInfo<Company>findPageAll(int pageNum, int pageSize, Integer cityId, Integer stageId, Integer industryId,String companyNmae);

    PageInfo<Company>findPageManage(Integer pageNum, Integer pageSize, Integer cityId, Integer industryId, Integer stageId, String companyName);


    void delete(Integer id);

    void upudateAuthable(Integer id);

    void upudateOpened(Integer id);

    void updatePassword(String userpass,Integer id);
}
